#include <stdio.h>
#include <stdlib.h>
#include "global.h"
#include "bits.h"

int main(int argc, char **argv)
{
	int i;
	for(i=0;i<=32;i++)
	{
		u_int32 m,n=0;
		m = n;
		set_bits(&n, i, BITS_ONE);
		printf("before bit:%u\t after bit:%u\t move bits:%d\n",m, n, i);		
	}	

	for(i=0;i<=32;i++)
	{
		u_int32 m,n=0;
		n = ~n;
		m = n;
		set_bits(&n, i, BITS_ZERO);
		printf("before bit:%u\t after bit:%u\t move bits:%d\n",m, n, i);		
	}

	for(i=0;i<=32;i++)
	{
		u_int32 m = 2863311530;
		if(is_bit_zero(&m, i)==0)
			printf("m:%u\tbit place:%d\tis zero:%s\n", m, i, "true");
		else
			printf("m:%u\tbit place:%d\tis zero:%s\n", m, i, "false");
	}
	getchar();
	return 0;
}
